In computer science, a virtual machine (VM) is a portion of software that, when executed on appropriate hardware, creates an environment allowing the virtualization of an actual physical computer system. Each VM may function as a self-contained platform, running its own operating system (OS) and software applications (processes). Typically, a virtual machine monitor (VMM) manages allocation and virtualization of computer resources and performs context switching, as may be necessary, to cycle between various VMs.
A host machine (e.g., computer or server) is typically enabled to simultaneously run multiple VMs, where each VM may be used by a local or remote client. The host machine allocates a certain amount of the host's resources to each of the VMs. Each VM is then able to use the allocated resources to execute applications, including operating systems known as guest operating systems. The VMM virtualizes the underlying hardware of the host machine or emulates hardware devices, making the use of the VM transparent to the guest operating system or the remote client that uses the VM.
Often times, a VM may need to be migrated from one host machine to another host machine for a variety of reasons. This migration process may be a live migrations process, referring to the fact that the VM stays running and operational (i.e., “live”) during most of the migration process. During live migration, the entire state of a VM is transferred from one host machine to another host machine. A critical piece of this transmission of state is the transfer of memory of the VM. The entire memory of a VM can often times fall in the order of gigabytes, which can result in a length live migration transfer process. In addition, because the VM is “live” during this transfer, memory may become “dirty” during the transfer. This means that a particular page of the memory that was already transferred has been modified on the VM that is still residing on the source host. Typically, these “dirty” pages are marked so that those particular pages of memory can be transferred again during the live migration process.
One problem with the current state of live migration is that it is unknown how long the migration process may take. Current techniques of live migration will stop operation of the VM during the live migration transfer of memory when there is an arbitrary, fixed number of memory pages left to be transferred. This downtime is an unavoidable part of the live migration process. However, this downtime can be bounder by the heuristic of the number of memory pages left to be transferred. For example, current techniques may set a fixed number of pages, for example 20 pages, to be left before the operation of the VM is stopped and the remaining memory transfer completed to finalize the migration of the VM. Unfortunately, the knowledge of this fixed page number does not mean anything when trying to determine what the downtime of the VM will be. This is because the transfer time depends on the network connection. With an unreliable network connection, the transfer time is an unknown quantity, thereby limiting the effectiveness and reliability of the live migration process. Furthermore, when the number of pages is actually too few, then this number of pages may never be achieved as the pages get dirty too fast.